#ifndef VIEWER_H
#define VIEWER_H 

#include "Element.h"
#include "../common/elementconfig.h"
#include <QGLViewer/qglviewer.h>
#include <QVector>

class Viewer : public QGLViewer
{
    Q_OBJECT;
private:
    QVector<Element*> _elements;
    QVector<Element*> _staticElements;

public:
    Viewer(QWidget *parent = 0);
    ~Viewer();
    void UpdateObjects(float *);
    void addElement(ElementType, float*, unsigned char *, float*);
    void addElement(Element *);
    void addStaticElement(Element *);
    void clear();

protected:
    virtual void animate();
    virtual void draw();
    virtual void init();
    virtual void startAnimation();
};

#endif // VIEWER_H
